﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BingVis.Common;

namespace BingVis.WPFClient
{
    public class FareViewModel : ViewModelBase
    {
        private decimal fareTotal;
        public decimal FareTotal
        {
            get { return fareTotal; }
            set
            {
                if (fareTotal != value)
                {
                    fareTotal = value;
                    OnPropertyChanged("FareTotal");
                }
            }
        }

        public DateTime QuarterHour { get; private set; }
        
        public FareViewModel(DateTime time)
        {
            fareTotal = 0M;
            QuarterHour = time.GetQuarterHour();
        }

        public void AddFareTotal(decimal amt)
        {
            fareTotal += amt;
            OnPropertyChanged("FareTotal");
        }
    }
}
